# $Id: PKGBUILD 177868 2013-02-10 13:06:19Z tomegun $
# Maintainer: Tom Gundersen <teg@jklm.no>
# Contributor: Judd <jvinet@zeroflux.org>

pkgname=libevent
pkgver=2.0.21
pkgrel=2
pkgdesc="An event notification library"
arch=('i686' 'x86_64')
url="http://www.monkey.org/~provos/libevent/"
license=('BSD')
depends=('openssl')
optdepends=('python2: to use event_rpcgen.py')
options=('!libtool')
source=(https://github.com/downloads/${pkgname}/${pkgname}/${pkgname}-$pkgver-stable.tar.gz{,.asc})

build() {
  cd "${srcdir}/${pkgname}-${pkgver}-stable"
  ./configure --prefix=/usr --sysconfdir=/etc
  make
}

check() {
  cd "${srcdir}/${pkgname}-${pkgver}-stable"
  make check
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}-stable"
  make DESTDIR="${pkgdir}" install
  install -Dm 644 LICENSE "${pkgdir}"/usr/share/licenses/libevent/LICENSE
}
md5sums=('b2405cc9ebf264aa47ff615d9de527a2'
         '31ffa4efc611c452697bd120a3bf8f9e')
